"""blog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path, re_path, include
from user import views



urlpatterns = [
    path('register/', views.RegisterView.as_view()),
    # 注册用户后，返回激活提示页面
    path('message/', views.message),
    # 邮箱激活路由
    re_path('activate/(?P<token>.*)', views.activate_user, name= 'active'),

    path('login/', views.LoginView.as_view()),
    # 获取图片验证码
    path('get_code/', views.get_code),
    # 手机验证码登录
    path('phone_login/', views.TelephoeLoginView.as_view()),
    # 发送短信验证码
    path('send_smscode/', views.SendSmsCode.as_view()),

    # 退出登录
    path('logout/', views.logout),
    # 修改密码
    path('set_password/', views.set_password)
]
